.toolbar {
    display: flex;
    background-color: #f0f0f0;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    align-items: center;
  }
  
  .toolbar-component {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 6px;
  }
  
  .toolbar-group {
    display: flex;
    align-items: center;
    margin-right: 6px;
  }
  
  .toolbar-group label {
    margin-right: 4px;
    font-size: 12px;
    white-space: nowrap;
    color: #333;
    font-weight: 500;
  }
  
  .toolbar-group select {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
  }
  
  .toolbar-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  .color-picker {
    display: flex;
    flex-wrap: wrap;
    max-width: 144px;
    background-color: white;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    padding: 2px;
  }
  
  .color-option {
    width: 14px;
    height: 14px;
    margin: 1px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
  }
  
  .color-option:hover {
    transform: scale(1.2);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  }
  
  .no-selection-message {
    color: #555;
    font-style: italic;
    padding: 5px 8px;
  }
  
  .custom-color-input {
    display: flex;
    align-items: center;
    margin-left: 4px;
  }
  
  .custom-color-input input[type="text"] {
    width: 58px;
    padding: 2px 4px;
    font-size: 11px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    margin-right: 3px;
  }
  
  .custom-color-input input[type="color"] {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    background: none;
    cursor: pointer;
  }
  
  .invalid-color {
    border-color: #ff4d4f !important;
    background-color: #fff1f0 !important;
  }

  .width-input {
    width: 50px !important;
  }

  .width-input .ant-input-number-handler-wrap {
    opacity: 1;
  }

  /* 美化InputNumber组件 */
  .ant-input-number-group-wrapper {
    width: auto !important;
  }

  .ant-input-number-affix-wrapper {
    display: inline-flex !important;
  }

  .ant-input-number-group-addon {
    background-color: #fafafa;
    color: #888;
    font-size: 12px;
    border-left: none;
  }

  .layer-buttons {
    display: flex;
    gap: 4px;
  }

  /* Increase specificity targeting Ant Button class, excluding danger */
  .toolbar-component .layer-buttons .layer-button.ant-btn:not(.ant-btn-dangerous) {
    font-size: 11px !important;
    height: 22px !important;
    padding: 0 6px !important;
    background-color: var(--color-primary);
    color: white;
    border: none;
  }
  
  /* Apply hover effect to the specific selector */
  .toolbar-component .layer-buttons .layer-button.ant-btn:not(.ant-btn-dangerous):hover {
    background-color: var(--color-primary); /* Keep primary color on hover */
    opacity: 0.8;
  }

  /* Ensure danger button retains its specific style (keep this rule) */
  .layer-button.ant-btn-dangerous {
    background-color: var(--color-error) !important; /* Use theme error color */
    color: white !important;
    border: none !important;
  }

  .layer-button {
    margin-right: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .layer-button:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: var(--color-primary) !important;
    opacity: 0.9;
  }

  .layer-button.ant-btn-dangerous:hover {
    background-color: var(--color-error) !important;
    opacity: 0.9;
  }

  .text-format-buttons {
    display: flex;
    gap: 4px;
  }

  .text-format-buttons .ant-btn {
    padding: 0 6px;
    font-size: 12px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .text-format-buttons .ant-btn-primary {
    background-color: #1890ff;
  }

  